import http from '@http';

const API_PREFIX = '/system/dict/data';

export function fetchGetDictDataList(values = {}) {
  return http.post(API_PREFIX + '/list', values);
}

export function fetchGetDictData(dictId) {
  return http.get(`${API_PREFIX}/detail/${dictId}`);
}

export function fetchAddDictData(params) {
  return http.post(API_PREFIX + '/insert', params);
}

export function fetchUpdateDictData(params) {
  return http.post(API_PREFIX + '/update', params);
}

export function fetchUpdateDictDataStatus(params) {
  return http.post(API_PREFIX + '/update/status', params);
}

export function fetchDeleteDictData(ids) {
  return http.post(API_PREFIX + '/delete', ids);
}
